package nn.functions;

public class HardlimFunction implements ActivationFunction {
	@Override
	public float calculateValue(float in) {
		return in < 0.5 ? 0 : 1;
	}

	@Override
	public String getType() {
		return ActivationFunctionFactory.HARDLIM_FUNC;
	}

	@Override
	public float calculateDerivative(float in) {
		return 0;
	}
}
